The character is not surrounded by apostrophes. It should be: 'W' .
Another of the primitive data types is the type boolean. It is used to represent a single true/false value. A boolean value can have only one of two values:
true false
In a Java program, the words true and false always mean these boolean values. The data type boolean is named after George Boole, a nineteenth century mathematician, who discovered that a great many things can be done with true/false values (otherwise known as bits.)